package best.driver.android.Utils;

import android.graphics.Bitmap;
import android.view.View;
import android.widget.ImageView;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;

public class ImageLoaderUtilListener implements ImageLoadingListener {

    ImageView mView = null;
    public ImageLoaderUtilListener(ImageView view) {
        this.mView = view;
    }

    public ImageLoaderUtilListener(){};

    @Override
    public void onLoadingCancelled(String arg0, View arg1) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {
        // TODO Auto-generated method stub
        if(mView != null) {
            mView.setImageBitmap(arg2);
        }
    }

    @Override
    public void onLoadingFailed(String arg0, View arg1, FailReason arg2) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void onLoadingStarted(String arg0, View arg1) {
        // TODO Auto-generated method stub
        
    }

}
